function [FracCorrectY1, FracIncorrectY0] = get_ROC(Predicted_Prob, VoteDem)

cutOffVec = (0:0.05:1);
h = 1; k = 1;
for i =1:length(VoteDem)
    
    if VoteDem(i,:) == 1
        VoteDem1Index(h,:) = i;
        h = h+1;
    else 
        VoteDem0Index(k,:) = i;
        k = k+1;
    end 
end


for i =1:length(cutOffVec);

    YHat(:,i) = Predicted_Prob>(cutOffVec(:,i));

    for j =1:length(VoteDem1Index)
        if YHat(VoteDem1Index(j,:),i) == 1;
            Y1Correct(j,i) = 1; 
        else
            Y1Correct(j,i) = 0;
        end
    end 

    for j =1:length(VoteDem0Index)
        if YHat(VoteDem0Index(j,:),i) == 1;
            Y0Incorrect(j,i) = 1; 
        else
            Y0Incorrect(j,i) = 0; 
        end
    end 
FracCorrectY1(:,i) = sum(Y1Correct(:,i))/length(Y1Correct(:,i));
FracIncorrectY0(:,i) = sum(Y0Incorrect(:,i))/length(Y0Incorrect(:,i));
end
